<?php
require_once('modules/persistence/mysql/mysqlconnection.class.php');

/**
 * Connection manager.
 * @author delormef
 * @version 1.0 - 12/12/2009
 */
class Connection {
	/**
	 * Database Manager instance.
	 * @var unknown_type
	 */
	static protected $database=null;
	
	/**
	 * Default constructeur.
	 */
	public function __construct(){
		
	}
	
	
	/**
	 * Return the corresponding Database Connection manager.
	 * @param $conn connection parameter from configuration <code>system.ini</code> file.
	 * @return database manager object.
	 */
	public function getDatabase($conn){
		if (self::$database==null)
		switch($conn['type']){
			case "mysql":
				self::$database = new MysqlConnection(); 
				return self::$database; 
		}
	}
}
?>